package com.zhou.blog.controller;

import com.zhou.blog.service.LoginService;
import com.zhou.blog.vo.Result;
import com.zhou.blog.vo.params.LoginParams;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @title:loginController
 * @Author Zhou
 * @Date:2022/4/24 15:12
 * @Version 1.0
 */
@RestController
@RequestMapping("api/login")
public class loginController {
    @Autowired
    private LoginService loginService;
    @Autowired
    private RedisTemplate<String,String> redisTemplate;

    @PostMapping
    public Result login(@RequestBody LoginParams loginParams){

        return loginService.login(loginParams);
    }
}
